import 'package:flutter/material.dart';
import 'package:x3_base_package/x3_base_package.dart';
import 'package:x3_business_core/business_customer/ful_components/business_customer_details_edit_address_tab.dart';

class BusinessCustomerDetailsAddress extends StatefulWidget {

  static String sName = 'BusinessCustomerDetailsAddress';

  @override
  _BusinessCustomerDetailsAddressState createState() => _BusinessCustomerDetailsAddressState();

}

class _BusinessCustomerDetailsAddressState extends State<BusinessCustomerDetailsAddress> {

  final BaseHttpResponseModel _response = new BaseHttpResponseModel.fromJson(
      {
        "fieldName": "contentAddressTitle",
        "name": "地址管理",
        "notes": "",
        "dataType": "java.lang.String",
        "inputType": "InputText",
        "inputApi": "/x3-service-vip-center/vip/addressmanage/page/query",
        "inputRegex": "",
        "showType": "Text",
        "appDisplay": "TabPage",
        "required": false,
        "length": 0,
        "hidden": false,
        "accessMode": "WebReadOnly",
        "width": "80px",
        "position": 3,
        "columnLockType": "none",
        "webUrl": "/x3-service-vip-bills-center/vipbills/vipuserbills/vipclerk/get/address/{vipid}",
        "sort": false,
        "costPrice": false,
        "fontColor": "",
        "columnBaseColor": ""
      }
  );

  @override
  Widget build(BuildContext context) {
    dynamic arguments = BaseRouterUtil.getArguments(context);
    String vipId = BaseUtils.getKeyData(arguments, 'vipId').toString();
    return BaseScaffoldComponent(
      title: '选择收货地址',
      child: BusinessCustomerDetailsEditAddressTab( response: _response, vipId: vipId, isChoosePage: true, ),
    );
  }

}
